In recent years, a capacity of a semiconductor storage device using a flash memory has been increased. The flash memory is used for a memory card and a USB memory and is also used instead of a magnetic recording-type storage device such as a hard disk drive. Usually, data is stored into the storage device by a file system, which is provided by an OS (abbreviation of Operation System) or a dedicated application. In order to convert a logical address that is treated by the file system into a physical address of the flash memory in which data is actually stored, a conversion table in which both addresses are associated with each other is used. Therefore, when a file application table or the like, which is an example of the conversion table, is damaged due to any reason, even though the data remains in the flash memory, the file system may not read out stored contents thereof.
For this reason, in the related art, the logical address is stored together with the data so that the data saved in the storage device can be read out even though the conversion table, in which the logical address and the physical address are associated with each other, is damaged. By doing so, even though the conversion table is damaged, a region in which the data is stored is read out, so that it is possible to obtain the logical address of the data and to thus reestablish the data (refer to Patent Documents 1 and 2).
Also, in the flash memory, when correcting the data, corrected data is written in a new region (a different block or a different page in the flash memory), instead of being overwritten in the same region as the data before correction. For this reason, the data corresponding to the same logical address is stored in a plurality of regions in the flash memory. Therefore, in JP-A-H11-85589, a sequence number, which is updated whenever writing into a new block is performed, is recorded together with the data. By doing so, when there are blocks having the same logical address recorded therein, the sequence numbers recorded in both the blocks are compared and the block having a new sequence number is registered in the table in which the logical address and the physical address are associated with each other, so that the data is reestablished. Also in JP-A-2008-146255, the similar processing is performed by using a cycle counter.
However, according to the above technology, it is necessary to read out the entire data so as to reestablish the stored data, so that a long time is needed for the reestablishment. Further, according to the technology disclosed in Patent Document 1, it is necessary to read out the data of the entire blocks so as to determine whether the same logical address as the logical address read out from any block is recorded in other blocks. Also, according to the technology disclosed in Patent Document 2, since the cycle counter is incremented for the first time at a point of time at which the writing into all the blocks is completed, a problem having occurred before the writing into the entire blocks is completed may cause a trouble in the reestablishment of the data.